<template>
  <div id="profile">
    <nav-bar class="nav-bar"><template #center>个人</template></nav-bar>
    <user-info></user-info>
    <!--2.没有单独封装: 不同的地方太多, 需要传过多的参数-->
    <section class="account">
      <div class="account-item">
        <div class="number">
          <span class="balance">0.00</span>元
        </div>
        <div class="account-info">我的余额</div>
      </div>
      <div class="account-item">
        <div class="number">
          <span class="balance">0</span>个
        </div>
        <div class="account-info">我的卡卷</div>
      </div>
      <div class="account-item">
        <div class="number">
          <span class="balance">0</span>分
        </div>
        <div class="account-info">我的积分</div>
      </div>
    </section>

    <!--3.封装成一个整体-->
    <order-module/>
    <tool-module/>
  </div>
</template>

<script charset="UTF-8">
import NavBar from 'components/common/navbar/NavBar.vue'
import UserInfo from './childComps/UserInfo'
import OrderModule from './childComps/OrderModule'
import ToolModule from "./childComps/ToolModule"
export default {
  components: {
    NavBar,
    UserInfo,
    OrderModule,
    ToolModule
    },
  name: 'Profile',
  data: function () {
    return {
    }
  },
}
</script>

<style scoped>
#profile {
  height: 1000vh;
  background-color: rgb(245, 241, 241);
  padding-right: px;
}
.nav-bar {
  background-color: var(--color-tint);
  color: #fff;
}
.account {
   display: flex;
   margin: 5px;
   justify-content: space-around;
}
.account-item {
  width: 32%;
  background-color: #fff;
  margin-right: 1px;
  text-align: center;
  border-radius: 5px;
}
.account-item {
  color: #666;
  font-size: 13px;
  padding: 18px;
}
.account-item .balance {
  font-size: 24px;
  font-weight: 700;
  color: #ff5f3e;
}
.account-info {
  margin-top: 6px;
}
</style>